`addHistogram`<-function(data,numCats,titleHist,attrName,numHistBarsPerCat,coloursForMap){

        if (titleHist!="") {
        #} else if ( logIndex ) {titleHist <- paste("Log",attrName)
        } else titleHist <- attrName

        #set breaks for histogram

        #16/3/09 numHistBarsPerCat doesn't work with new method of classifying
        #thats Ok we may just set it to 1 permanently : it was dificult for people to get their head around anyway

        #breaksVector <- seq( from=min(dFbyCountry[[colNameRaw]],na.rm=TRUE),to= max(dFbyCountry[[colNameRaw]],na.rm=TRUE), length.out=numHistBreaks )
        numHistBreaks <- 1 + numCats * numHistBarsPerCat
        #breaksVector <- seq( from=min(sGDF[[attrName]],na.rm=TRUE),to=max(sGDF[[attrName]],na.rm=TRUE), length.out=numHistBreaks )
        breaksVector <- seq( from=0,to=numCats, length.out=numHistBreaks )
        #cols4Hist <- rep(1:numCats, each=numHistBarsPerCat)
        #16/3/09 allowing colours to be set from palette
        cols4Hist <- rep(coloursForMap, each=numHistBarsPerCat)

        #******
        #** would need to subset this by the spatial extents passed to the method
        #** if I want the histogram just to display those in the zoomed map
        hist(data, main=titleHist, breaks=breaksVector, col=cols4Hist)
}
